<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        p{
            display: block;
            width: 300px;
            border: 2px solid gray;
            text-align: center;
            /* 设置换行的方式 */
            hyphens: auto;
            font-size: 26px;

            /* 设置一点内边距，美观一点，不会太紧凑 */
            padding: .5em;
            /* 设置行高 */
            line-height: 1.5em;
            /* 整体背景颜色，条纹的其中一个颜色 */
            background: beige;
            /* 设置整体背景颜色为线性渐变，给某个颜色加透明，成为条纹的另一个颜色 */
            background-image: linear-gradient(rgba(0,0,0,.2) 50%,transparent 0);
            /* 因为行高为1.5em，两种颜色条纹为3em */
            background-size: auto 3em;
            /* 因为设置了内边距，占了一定位置，改成内容区模式 */
            background-origin: content-box;
        }
    </style>
</head>
<body>
    <!-- 给每一行文字加上条纹背景 -->
    <p>The only way to get rid of a temptation is to yield to it.
        Resist it, and your soul grows sick with longing for the 
        things it has forbidden to itself, with  desire for what 
        its monstrous laws have made monstrous and unlawful.
    </p>
</body>
</html>